<template>
  <transition>
    <div class="report-order-details push-order-details">

      <section class="app-main" style="padding: 0;">
        <mt-swipe :auto="4000" class="pic-car" v-if="picCar.length>0">
          <mt-swipe-item v-for="(item,index) in picCar">
            <img :src="item.src" @click="handleCheckPic('0',index)">
          </mt-swipe-item>
        </mt-swipe>
        <!--<div class="pic-none-car" v-if="picCar.length<=0">-->
        <!--暂无车型图片！-->
        <!--</div>-->

        <div class="module-height"></div>
        <dl class="module-block" v-if="res.cancelApplyReason">
          <dt class="block-header">取消原因</dt>
          <dd class="word-content word-info" v-html="res.cancelApplyReason"></dd>
        </dl>
        <dl class="module-block" v-if="res.feedBackMessage && shopKeeper==1">
          <dt class="block-header">门店管理员反馈消息</dt>
          <dd class="word-content word-info" v-html="res.feedBackMessage"></dd>
        </dl>
        <dl class="module-block ">
          <dt class="block-header">服务内容</dt>
          <dd class="word-content word-info" v-html="res.remark"></dd>
        </dl>
        <dl class="module-block" v-if="res.comments">
          <dt class="block-header">备注信息</dt>
          <dd class="word-content word-info" v-html="res.comments"></dd>
        </dl>
        <dl class="module-block" v-if="res.confirmComments || res.incomplete">
          <dt class="block-header">施工反馈</dt>
          <dd class="word-content word-info"><span v-if="res.incomplete==1">无法完工-</span>{{res.confirmComments}}</dd>
        </dl>
        <dl class="module-block" v-if="picRepair.length>0">
          <dt class="block-header">完工图片</dt>
          <dd class="word-content word-car-repair">
            <ul class="car-repair-list">
              <li class="car-repair-item" v-for="(item,index) in picRepair">
                <img :src="item.src" @click="handleCheckPic('1',index)">
              </li>
            </ul>
          </dd>
        </dl>
        <dl class="module-block">
          <dt class="block-header">订单信息<span class="item-state text-red" v-text="res.storeAllotStatusDesc"></span></dt>
          <!--<dd class="word-content">客户名称：<span v-text="res.applyCustomName"></span><span><template v-if="res.applyCustomDesc">({{res.applyCustomDesc}})</template></span></dd>-->
          <!--<dd class="word-content">报&nbsp; 案&nbsp; 号：<span v-text="res.insureNumber"></span></dd>-->
          <dd class="word-content">车&nbsp; 牌&nbsp; 号：<span v-text="res.carNo"></span></dd>
          <dd class="word-content">自&nbsp; 编&nbsp; 号：<span v-text="res.selfNumber"></span></dd>
          <dd class="word-content">车&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型：<span v-text="res.carModel"></span></dd>
          <dd class="word-content">内部单号：<span v-text="res.innerSn"></span></dd>
          <dd class="word-content">工&nbsp; 单&nbsp; 号：<span v-text="res.sn"></span></dd>
          <dd class="word-content">提交时间：<span v-text="res.createDate"></span></dd>

          <dd class="word-content">
            签&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;单：
          <span>
            <template v-if="res.isWritten=='0'">未签单</template>
            <template v-if="res.isWritten=='1'">已签单</template>
            <template v-if="res.isWritten=='2'">免签单</template>
          </span>
          </dd>
          <dd class="word-content">
            收&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;款：
          <span>
            <template v-if="res.isGathering=='0'">未收款</template>
            <template v-if="res.isGathering=='1'">已收款</template>
          </span>
          </dd>
        </dl>
        <dl class="module-block">

          <dd class="word-content" v-if="res.serviceTime">预约时间：<span>{{res.serviceTime}} {{res.serviceTimeRange}}</span></dd>
          <dd class="word-content" v-if="res.allotStatus!==1 && res.linkMan">联 系 人：<span>{{res.linkMan}}&nbsp;&nbsp;<a :href="'tel:' + res.linkPhone">{{res.linkPhone}}</a></span></dd>
          <dd class="word-content word-content-address">
            <div class="item-left">作业地点：</div>
          <span class="item-right" v-if="res.xAxis">
            <span class="item-address" @click="handleNavigation">{{res.address}}</span>
            <span class="item-action">
            <span class="iconfont icon-didian1" @click="handleNavigation"></span>
              <!--<template v-if="shopKeeper==1">-->
              <!--<span class="iconfont icon-bianji" v-if="res.storeAllotStatus==2 || res.storeAllotStatus==3 || res.storeAllotStatus==4" @click="handleSelectAddress"></span>-->
              <!--</template>-->
              </span>
          </span>
          <span class="item-right" v-else>
            <span class="item-address">{{res.address}}</span>
            <!--<span class="item-action">-->
            <!--<template v-if="shopKeeper==1">-->
            <!--<span class="iconfont icon-bianji" v-if="res.storeAllotStatus==2 || res.storeAllotStatus==3 || res.storeAllotStatus==4" @click="handleSelectAddress"></span></template>-->
            <!--</span>-->
          </span>
          </dd>
        </dl>
        <!--<dl class="module-block module-block-first">-->
        <!--<dt class="block-header">管理员提醒</dt>-->
        <!--<dd class="word-content word-info">注意事项：<span v-text="form.notes"></span></dd>-->
        <!--<dd class="word-content word-info">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：<span v-text="res.allotComments"></span></dd>-->
        <!--</dl>-->

        <dl class="module-block module-block-price" v-if="res.allotStatus!==3 && res.demandType!=2">
          <dt class="block-header">报价明细
          <span v-if="res.needPay==true && res.finishOffer==true">
          <template v-if="payStatus==0">
            <mt-button v-if="res.storeAllotStatus==2 || res.storeAllotStatus==3 || res.storeAllotStatus==4" class="button-pay" type="primary" @click="handleToSelectPay">立即支付</mt-button>
          </template>
          <template v-else>
            <span class="pay-tips text-red">已付款</span>
          </template>
          </span>
          </dt>
          <dd class="word-content" v-for="item in res.parts">{{item.name}}<template v-if="item.partTypeDesc">({{item.partTypeDesc}})</template>：<span class="text-red text-price">￥{{item.amount}}</span></dd>
          <dd class="word-content" v-for="item in res.items">{{item.name}}<template v-if="item.partTypeDesc">({{item.partTypeDesc}})</template>：<span class="text-red text-price">￥{{item.amount}}</span></dd>

          <dd class="word-content">合&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;计：<span class="text-red text-price">￥{{res.totalAmt}}</span></dd>
        </dl>
        <dl class="module-block module-block-price" v-if="res.allotStatus!==3 && res.demandType==2">
          <dt class="block-header">报价明细
          </dt>
          <dd class="word-content" v-for="item in res.parts" v-if="item.isChoose==1">{{item.remark}}<template v-if="item.partTypeDesc">({{item.partTypeDesc}})</template>：<span class="text-red text-price">￥{{item.amount}}</span></dd>

          <dd class="word-content">合&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;计：<span class="text-red text-price">￥{{res.totalAmt}}</span></dd>
        </dl>

        <template v-if="res.storeAllotStatus!=7">
          <div class="button-content" v-if="res.allotStatus==1 && shopKeeper==1" style="padding-bottom: 0;">
            <div class="button-block-6">
              <mt-button type="primary" @click="handleConfirm">立即接单</mt-button>
            </div>
            <div class="button-block-6">
              <mt-button type="default" @click="handleCancle">拒绝接单</mt-button>
            </div>
          </div>
          <div class="button-content">

            <!--管理员确认操作-->
            <div class="button-block-6" v-if="res.allotStatus==2 && shopKeeper==1">
              <mt-button type="primary" @click="handleFinishConfirm">点我确认完成订单</mt-button>
            </div>
            <!--管理员确认操作-->

            <!--员工操作的按钮-->
            <div class="button-block-6" v-if="res.allotStatus!==1 && res.allotStatus!==3 && res.allotStatus!==6">
              <mt-button type="primary" @click="handlePhoto">上传维修照片({{picRepair.length}})</mt-button>
            </div>
            <!--<div class="button-block-6" v-if="res.allotStatus!==4 && shopKeeper!==1">-->
              <!--<mt-button type="danger" @click="handlePostNote">反馈消息给管理员</mt-button>-->
            <!--</div>-->
            <!--员工操作的按钮-->

            <!--管理员分派操作-->
            <div class="button-block-12" style="padding: 20px 0 0;" v-if="res.allotStatus==2 && shopKeeper==1">
            <mt-button type="primary" @click="handleSend">转派同事</mt-button>
            </div>
            <!--管理员分派操作-->

            <!--管理员反馈给平台-->
            <!--<div class="button-block-12" style="padding: 20px 0 0;" v-if="res.allotStatus!=0 && shopKeeper==1">-->
            <!--<mt-button type="danger" @click="noteToDispatcherPopup=true">反馈给调度员</mt-button>-->
            <!--</div>-->
            <!--管理员反馈给平台-->
            <!--管理员取消操作-->

            <template v-if="shopKeeper==1">
              <div class="del-button" v-if="res.storeAllotStatus==2 || res.storeAllotStatus==3 || res.storeAllotStatus==4">
                <span class="iconfont icon-bianji icon-fankui" @click="noteToDispatcherPopup=true"> 反馈给平台调度员</span>
                <span class="iconfont icon-shanchu" @click="handleCancelApply">申请取消</span></div>
            </template>

            <!--管理员取消操作-->
          </div>
        </template>
      </section>

      <!--图片大图弹窗-->
      <mt-popup
        v-model="popupSwiper"
        position="middle" class="me-popup me-popup-pic" @click.native="handleCloseSwiper">
        <mt-swipe class="swiper-pic" :auto="0" v-if="picList.length>0" :defaultIndex="picIndex">
          <mt-swipe-item v-for="(item,index) in picList">
            <div class="item-content">
              <img class="img" :src="item.src"/>
            </div>
            <span class="item-title">{{index+1}}/{{picList.length}}　{{item.fileLocate}}</span>
          </mt-swipe-item>
        </mt-swipe>
      </mt-popup>
      <!--图片大图弹窗-->

      <!--选择施工员-->
      <mt-popup
        v-model="applyStorePopup"
        position="bottom" class="apply-store-popup">
        <div class="module">
          <span class="module-title">请选择施工员
            <mt-button class="action-add-user" type="primary" @click="handleAddUser">新增员工</mt-button></span>
          <div class="module-body">
            <dl class="people-list">
              <dd class="people-item" v-if="optionsPeopleNameF.length>0">
                <mt-checklist
                  class="select-people-name"
                  title=""
                  v-model="selectPeopleNameF"
                  :options="optionsPeopleNameF">
                </mt-checklist>
              </dd>
            </dl>

          </div>
        </div>
        <div class="module-store-info">
          <span class="module-title">派工备注<span class="store-info-tips">非必填</span></span>
          <div class="module-content">
            <mt-field class="item-input" label="内部单号" placeholder="" v-model="form.innerSn"></mt-field>

            <div class="module-position">
              <span class="label-title">注意事项</span>
              <mt-checklist
                class="select-people-name"
                title=""
                v-model="selectNote"
                :options="optionsNote">
              </mt-checklist>
            </div>
            <textarea v-model="form.allotComments" class="item-textarea" placeholder="请输入派工备注" oninput="this.style.height=this.scrollHeight + 'px'"></textarea>
          </div>
        </div>
        <div class="button-content">
          <div class="button-block-6">
            <mt-button type="danger" @click="applyStorePopup = false">取 消</mt-button>
          </div>
          <div class="button-block-6">
            <mt-button type="primary" @click="handleSureOffer">确认派工</mt-button>
          </div>
        </div>
      </mt-popup>
      <!--选择施工员-->

      <!--管理员申请取消弹窗-->
      <mt-popup
        v-model="popupApplyCancel"
        position="bottom" class="popup-apply-cancel">
        <div class="module-store-info">
          <span class="module-title">取消原因</span>
          <div class="module-content">
            <textarea v-model="form.cancelApplyReason" class="item-textarea" placeholder="请输入取消本订单的原因" oninput="this.style.height=this.scrollHeight + 'px'"></textarea>
          </div>
        </div>
        <div class="button-content">
          <div class="button-block-6">
            <mt-button type="danger" @click="popupApplyCancel = false">取消申请</mt-button>
          </div>
          <div class="button-block-6">
            <mt-button type="primary" @click="handleSureApplyCancel">提交申请</mt-button>
          </div>
        </div>
      </mt-popup>
      <!--管理员申请取消弹窗-->

      <!--地图弹窗-->
      <mt-popup
        v-model="popupMap"
        position="right" class="popup-map">
        <map-select v-if="isSelectMap" @mapData="getMapData" @mapClose="handleMapClose"></map-select>
      </mt-popup>
      <!--地图弹窗-->

      <!--管理员提交备注-->
      <mt-popup
        v-model="noteToDispatcherPopup"
        position="bottom" class="popup-apply-cancel">
        <div class="module-store-info">
          <span class="module-title">反馈给平台调度员</span>
          <div class="module-content">
            <textarea v-model="form.feedBackMessage" class="item-textarea" placeholder="请输入反馈给平台调度员的消息" oninput="this.style.height=this.scrollHeight + 'px'"></textarea>
          </div>
        </div>
        <div class="button-content">
          <div class="button-block-6">
            <mt-button type="danger" @click="noteToDispatcherPopup = false">取 消</mt-button>
          </div>
          <div class="button-block-6">
            <mt-button type="primary" @click="handleNoteToDispatcher">确认提交</mt-button>
          </div>
        </div>
      </mt-popup>
      <!--员工提交备注-->

      <!--员工提交备注-->
      <mt-popup
        v-model="addNotePopup"
        position="bottom" class="apply-store-popup">
        <div class="module-store-info">
          <span class="module-title">施工反馈</span>
          <div class="module-content">
            <mt-checklist
              title=""
              class="select-wangong"
              v-model="isFinish"
              :options="optionsIsFinish">
            </mt-checklist>
            <textarea v-model="form.confirmComments" class="item-textarea" placeholder="请输入给管理员的反馈消息" oninput="this.style.height=this.scrollHeight + 'px'"></textarea>
          </div>
        </div>
        <div class="button-content">
          <div class="button-block-6">
            <mt-button type="danger" @click="addNotePopup = false">取 消</mt-button>
          </div>
          <div class="button-block-6">
            <mt-button type="primary" @click="handleSureAddNote">确认提交</mt-button>
          </div>
        </div>
      </mt-popup>
      <!--员工提交备注-->

      <!--选择支付方式弹窗-->
      <mt-popup
        v-model="selectPayModal"
        position="middle"
        class="select-pay-modal">
        <div class="select-pay-title">请选择以下支付方式</div>
        <dl class="select-pay-content">
          <dd class="item">
            <mt-button type="primary" @click="handlePayCode">二维码收款</mt-button>
          </dd>
          <dd class="item">
            <mt-button type="danger" @click="handlePayWx">代用户付款</mt-button>
          </dd>
        </dl>
      </mt-popup>

      <!--支付二维码弹窗-->
      <mt-popup
        v-model="codeModal"
        position="bottom"
        class="code-modal">
        <div class="modal-header">支付二维码<span class="iconfont icon-close2" @click="handlePayCancel"></span></div>
        <div class="modal-body">
          <div class="code" id="qrcode" ref="qrcode">
          </div>
          <div class="price text-red">金额：￥{{res.totalAmt}}</div>
        </div>
      </mt-popup>
    </div>
  </transition>
</template>

<script>
  import { Navbar,Button,MessageBox,Toast ,Checklist,Indicator} from 'mint-ui';
  import mapSelect from '../common/map-select';

  import QRCode from 'qrcodejs2'
  export default {
    components:{
      mapSelect
    },
    data () {
      return {
        noteToDispatcherPopup:false,
        codeUrl:'',
        qrcode:'',
        selectPayModal:false,
        codeModal:false,
        payStatus:0,
        picIndex:0,
        goStateId:'',
        orderManager:'',
        selectPeopleNameF:[],
        optionsPeopleNameF:[],
        selectNote:[],
        optionsIsFinish:[
          {
            label:'无法完工',
            value:'1',
          }
        ],
        optionsNote:[
          {
            label:'保险拍照',
            value:'保险拍照',
          },{
            label:'签单',
            value:'签单',
          },{
            label:'收现金',
            value:'收现金',
          },
        ],
        applyStorePopup:false,
        addNotePopup:false,
        popupSwiper:false,
        picList:[],
        res:'',
        picArr:[],
        picCar:[],
        picRepair:[],
        shopKeeper:'',
        storeAllMen:[],
        isFinish:[],
        hasSelectCollege:[],
        form:{
          notes:'',
          allotComments:'',
          confirmComments:'',
          cancelApplyReason:'',
          feedBackMessage:'',
          allotsSave:[],
          incomplete:0
        },
        popupApplyCancel:false,
        popupMap:false,
        userlocation: {lng: "", lat: ""},
        isSelectMap:false,
      }
    },
    beforeRouteEnter (to, from, next) {
      var u = navigator.userAgent;
      var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
      // XXX: 修复iOS版微信HTML5 History兼容性问题
      if (isiOS && to.path !== location.pathname) {
        // 此处不可使用location.replace
        location.assign(to.fullPath)
      } else {
        next()
      }
    },
    beforeRouteLeave (to, from , next) {
      if(this.goStateId!==''){
        from.query.stateId=this.goStateId;
      }
      next();
    },
    mounted(){

      sessionStorage.setItem('goStateId',this.$route.query.stateId); // 存入一个值

      this.$axios({
        method: 'post',
        url:'gp/bu/login!userInfo.do',
      }).then((res)=>{
        if(res.data.result==true){
        if(res.data.object.isAdmin=='0101' || res.data.object.isShopKeeper=='0101'){
          this.shopKeeper=1;
        }else{
          this.shopKeeper=0;
        }
      }
    });

      this.getData();
      //  调取微信配置接口
      this.url=location.href;
      var params = new URLSearchParams();
      params.append('url',this.url);
      this.$axios({
        method: 'post',
        url:'gp/bu/wechat!getJsapi.do',
        data:params
      }).then((res)=> {
        this.wxConfig=res.data.object;

      this.accessToken=res.data.object.accessToken;
      this.$wx.config({
        beta: true,// 必须这么写，否则wx.invoke调用形式的jsapi会有问题
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: this.wxConfig.appid, // 必填，微信的corpID
        //appId: 'wxd05b751d02449b6a', // 必填，微信的corpID
        timestamp:this.wxConfig.timestamp, // 必填，生成签名的时间戳
        nonceStr: this.wxConfig.nonceStr, // 必填，生成签名的随机串
        signature: this.wxConfig.signature,// 必填，签名，见附录1
        jsApiList: ['openLocation','chooseWXPay'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
      });
    });


    },
    watch:{
      'selectNote'(val){
        this.form.notes='';

        for(var i=0;i<val.length;i++){
          if(i==0){
            this.form.notes+=val[i]
          }else{
            this.form.notes+='、'+val[i];
          }
        }
      },
      'isFinish'(val){
        console.log(val)
        if(val.length>0){
          this.form.incomplete=1;
        }else{
          this.form.incomplete=0;
        }
      },
      'selectPeopleNameF'(val){
        this.form.allotsSave=[];
        this.hasSelectCollege=[];
        for(var i=0;i<val.length;i++){
          for(var j=0;j<this.storeAllMen.length;j++){
            if(val[i]==this.storeAllMen[j].userId){
              const item={
                allotShopId:this.form.allotShopId,
                allotMemberId:val[i],
                allotOpenId:this.storeAllMen[j].openId,
                allotMemberName:this.storeAllMen[j].name,
              }
              if(this.storeAllMen[j].isAdmin=='0101'){
                item.memberType=1;

              }else{

                item.memberType=0;
                this.hasSelectCollege.push(this.storeAllMen[j])
              }
              this.form.allotsSave.push(item)
            }
          }
        }
      },
      'form.uploads'(val){
        for(var i=0;i<val.length;i++){
          this.$set(this.files[i], 'tag', val[i].etag)
        }
      },
      'codeModal'(val){
        if(val==false){
          this.$refs.qrcode.innerHTML = ""
          this.code='';
          clearInterval(this.getStatus);
        }
      }
    },
    methods:{
      handleAddUser(){
        this.$router.push({path:'/store-add-user'})
      },
      /**获取详情**/
      getData(){


        this.selectPeopleNameF=[];
        this.optionsPeopleNameF=[];
        var params = new URLSearchParams();
        params.append('form.pageSize',50);

        this.$axios({
          method: 'post',
          url:'gp/bu/user!getUserListApp.do',
          data:params
        }).then((res)=>{

        this.storeAllMen=res.data.rows;
        for(var i=0;i<res.data.rows.length;i++){
          const item={
            label:res.data.rows[i].name,
            value:res.data.rows[i].userId,
          }
          if(res.data.rows[i].isAdmin=='0102'){
            this.optionsPeopleNameF.push(item)
          }
        }
      });

        var params = new URLSearchParams();
        params.append('form.demandId',this.$route.query.id);
        params.append('businessType',1);
        this.$axios({
          method: 'post',
          url:'gp/bu/serviceDemandApp!demandDetail.do',
          data:params
        }).then((res)=>{
//        if(res.data.statusCode==200){

          if(res.data.result==false){
          Indicator.open({
            text: res.data.message,
            spinnerType: 'fading-circle'
          });
          return false;
        }
          this.res=res.data.object;
        this.form.id=this.res.demandId;
        this.payStatus=this.res.payStatus
        if(this.res.notes!==undefined){
          this.selectNote = this.res.notes.split('、');
        }
        this.form.allotShopId=this.res.allotShopId;
        this.form.allotShopName=this.res.allotShopName;
        this.form.allotComments=this.res.allotComments;
        this.form.innerSn=this.res.innerSn;
        this.form.confirmComments=this.res.confirmComments;
        this.form.feedBackMessage=this.res.feedBackMessage;

        if(this.res.incomplete){
          this.form.incomplete=this.res.incomplete;
          if(this.res.incomplete==0){
            this.isFinish=[];
          }else{
            this.isFinish=['1'];
          }
        }

        this.picCar=[];
        this.picRepair=[];
        for(var i=0;i<this.res.uploads.length;i++){
          if(this.res.uploads[i].fileType==1){
            this.picArr.push(this.res.uploads[i]);
          }
          if(this.res.uploads[i].fileType==0){
            const picItem = {src: 'https://rmcbapp.oss-cn-shenzhen.aliyuncs.com/'+this.res.uploads[i].ossPath+'?x-oss-process=image/resize,h_320',
            }
            this.picCar.push(picItem)
          }else if(this.res.uploads[i].fileType==1){
            const picItem = {src: 'https://rmcbapp.oss-cn-shenzhen.aliyuncs.com/'+this.res.uploads[i].ossPath+'?x-oss-process=image/resize,h_320',
            }
            this.picRepair.push(picItem)
          }
        }
        for(var i=0;i<this.res.allots.length;i++){
          if(this.res.allots[i].effectiveType==1 && this.res.allots[i].memberType==0){
            this.orderManager=this.res.allots[i].allotUser;
          }
        };
        var regx = /(1[3|4|5|7|8][\d]{9}|0[\d]{2,3}-[\d]{7,8}|400[-]?[\d]{3}[-]?[\d]{4})/g;
        var regxZj = /0\d{2,3}\d{7,8}/;
        var str = this.res.remark;

        var strresult = matchPhoneNum(str,regx);
        this.res.remark=strresult;
        function matchPhoneNum(str,regx){
          var phoneNums1 = str.match(regx);
          var phoneNums2 = str.match(regxZj);
          if(phoneNums1==null){
            return str;
          }
          var phoneNums = phoneNums1.concat(phoneNums2);
          console.log(phoneNums,1111)
          if(phoneNums==null){
            return str;
          }
          for(var i=0;i<phoneNums.length;i++){
            console.log(phoneNums[i])
            var newPhone='<a href="tel:'+phoneNums[i]+'">'+phoneNums[i]+'</a>';
            str = str.replace(phoneNums[i],newPhone)
          }
          return str;
        };
//      }
      });
      },

      /**确认是否接单**/
      handleConfirm(){
        MessageBox({
          title: '',
          message: '是否确认接单?',
          showCancelButton: true
        }).then(action => {
          if(action=='confirm'){
          /**是否接单*,allotStatus=2接单*/
          const demandData={
            id:this.$route.query.id,
            sn:this.res.sn,
            allotStatus:2,
          }
          var params = new URLSearchParams();
          params.append('demandData',JSON.stringify(demandData));
          this.$axios({
            method: 'post',
            url:'gp/bu/serviceDemandApp!receiveDemand.do',
            data:params
          }).then((res)=>{
            console.log(res)
          if(res.data.result==true){
            this.getData()
            Toast({
              message: '您已接单，请尽快上门服务！',
              position: 'middle',
              duration: 1200
            });
          }else{
            Toast({
              message: res.data.message,
              position: 'middle',
              duration: 1200
            });
          }
        });

        }
      });
      },
      handleCancle(){
        MessageBox({
          title: '',
          message: '是否拒绝接单?',
          showCancelButton: true
        }).then(action => {
          if(action=='confirm'){

          /**是否接单*,allotStatus=3拒绝接单*/
          const demandData={
            id:this.$route.query.id,
            sn:this.res.sn,
            allotStatus:3,
          }
          var params = new URLSearchParams();
          params.append('demandData',JSON.stringify(demandData));
          this.$axios({
            method: 'post',
            url:'gp/bu/serviceDemandApp!receiveDemand.do',
            data:params
          }).then((res)=>{
            console.log(res)
          if(res.data.result==true){
            this.getData()
            Toast({
              message: '您已拒绝接单！',
              position: 'middle',
              duration: 800
            });
          }else{
            Toast({
              message: res.data.message,
              position: 'middle',
              duration: 1200
            });
          }
        });
        }
      });
      },

      /**上传图片**/
      handlePhoto(){
        this.$router.push({path:'/upload-photos',query: {id:this.$route.query.id}})
      },

      /**确认完工**/
      handleFinishConfirm(){
        if(this.picArr.length>0){

//          if(this.res.needPay!=undefined){

//            if(this.res.needPay==true && this.res.finishOffer==false){
//
//              MessageBox({
//                title: '',
//                message: '请和客服人员确认报价',
//                showCancelButton: true
//              }).then(action => {
//                if(action=='confirm'){
//
//              }
//            });
//              return false;
//            }
//            if(this.res.needPay==true && this.res.finishOffer==true && this.res.payStatus==0 && this.res.totalAmt!=0){
//
//              MessageBox({
//                title: '',
//                message: '请先支付订单',
//                showCancelButton: true
//              }).then(action => {
//                if(action=='confirm'){
//                this.handleToSelectPay();
//              }
//            });
//              return false;
//            }
//          }else{
//            if(this.res.demandSource==3 || this.res.demandSource==5){
//              MessageBox({
//                title: '',
//                message: '请等待客服人员报价',
//                showCancelButton: true
//              }).then(action => {
//                if(action=='confirm'){}
//            });
//              return false;
//            }
//          }

          MessageBox({
            title: '',
            message: '确认是否完成订单?',
            showCancelButton: true
          }).then(action => {
            if(action=='confirm'){
            var params = new URLSearchParams();

            /**是否确认完成*/
            params.append('id',this.$route.query.id);
            const postData={
              id:this.$route.query.id
            };
            params.append('demandData',JSON.stringify(postData));

            this.$axios({
              method: 'post',
              url:'gp/bu/serviceDemandApp!completeDemand.do',
              data:params
            }).then((res)=>{
              console.log(res)
            if(res.data.result==true){
              Toast({
                message: '订单已完成！',
                position: 'middle',
                duration:800
              });
              this.getData();
//            this.$router.push({path:'/push-order-list',query: {stateId:'4'}})
            }else{
              Toast({
                message: res.data.message,
                position: 'middle',
                duration:1200
              });
            }
          });
          }
        });
        }else{
          MessageBox({
            title: '',
            message: '请注意上传施工前、施工后的图片！',
            showCancelButton: true
          }).then(action => {
            if(action=='confirm'){
            this.$router.push({path:'/upload-photos',query: {id:this.$route.query.id}})
          }
        });
        }
      },

      /**分派弹窗**/
      handleSend(){
        this.selectPeopleNameF=[];
        this.hasSelectCollege=[];
        console.log(this.res.allots)
        for(var i=0;i<this.res.allots.length;i++){
          if(this.res.allots[i].effectiveType==1){
            this.selectPeopleNameF.push(this.res.allots[i].allotMemberId)
          }
          if(this.res.allots[i].effectiveType==1 && this.res.allots[i].memberType==0){

            this.hasSelectCollege.push(this.res.allots[i])
          }
        }
        this.applyStorePopup=true;
      },
      /** 确认派单 **/
      handleSureOffer(){
        if(this.hasSelectCollege.length<=0){
          Toast({
            message: '请选择施工员',
            position: 'middle',
            duration:1000
          });
          return false;
        }
        this.form.allotType=1;
        var params = new URLSearchParams();
        params.append('demandData',JSON.stringify(this.form));
        this.$axios({
          method: 'post',
          url:'gp/bu/serviceDemandApp!allotDemand.do',
          data:params
        }).then((res)=>{
          if(res.data.result=true){
          Toast({
            message: '派工成功',
            position: 'middle',
            duration:1200
          });
          this.applyStorePopup = false;
          this.getData();

        }else{
          this.$message({
            message:res.data.message,
            type: 'error',
            duration:1200
          });
        }
      })
      },
      /** 查看图片 **/
      handleCheckPic(fileType,idx){
        this.picIndex=idx;
        this.picList=[];
        for(var i=0;i<this.res.uploads.length;i++){

          if(this.res.uploads[i].fileType==fileType){
            const picItem = {src: 'https://rmcbapp.oss-cn-shenzhen.aliyuncs.com/'+this.res.uploads[i].ossPath+'?x-oss-process=image/resize,h_650',
            }
            this.picList.push(picItem)
          }
        }
        this.popupSwiper=true;
      },
      /** 关闭图片轮转弹窗**/
      handleCloseSwiper(){
        this.popupSwiper=false;

        setTimeout(()=>{
          this.picList=[];
      },500)

      },
      /** 玻璃工提交备注弹窗 **/
      handlePostNote(){
        this.addNotePopup=true;
      },
      /** 玻璃工确认提交备注 **/
      handleSureAddNote(){
        if(this.form.confirmComments==''){
          Toast({
            message: '请输入反馈内容',
            position: 'middle',
            duration:800
          });
          return false;
        }
        var params = new URLSearchParams();
        params.append('demandId',this.$route.query.id);
        params.append('incomplete',this.form.incomplete);
        params.append('confirmComments',this.form.confirmComments);
        this.$axios({
          method: 'post',
          url:'gp/declaration/setComment',
          data:params
        }).then((res)=>{
          console.log(res)
        if(res.data.statusCode==200){
          Toast({
            message: '提交反馈消息成功',
            position: 'middle',
            duration:800
          });
          this.getData();
          this.addNotePopup=false;
        }else{
          Toast({
            message: res.data.message,
            position: 'middle',
            duration:800
          });
          this.addNotePopup=false;
        }
      });
      },

      /** 管理员确认提交备注 **/
      handleNoteToDispatcher(){
        Indicator.open({
          text: '提交中...',
          spinnerType: 'snake'
        });
        if(this.form.feedBackMessage==''){
          Toast({
            message: '请输入反馈内容',
            position: 'middle',
            duration:800
          });
          return false;
        }
        var params = new URLSearchParams();
        const postData={
          id:this.$route.query.id,
          feedBackMessage:this.form.feedBackMessage
        }
        params.append('demandData',JSON.stringify(postData));
        this.$axios({
          method: 'post',
          url:'gp/bu/serviceDemandApp!feedBackMessage.do',
          data:params
        }).then((res)=>{
          console.log(res)
        if(res.data.statusCode==200){

          Indicator.close();
          Toast({
            message: '提交反馈消息成功',
            position: 'middle',
            duration:800
          });
          this.getData();
          this.noteToDispatcherPopup=false;
        }else{

          Indicator.close();
          Toast({
            message: res.data.message,
            position: 'middle',
            duration:800
          });
          this.noteToDispatcherPopup=false;
        }
      }).catch((error)=>{
          Indicator.close();
        Toast({
          message: error,
          position: 'middle',
          duration:1000
        });
      });;
      },
      handleNavigation(){

        this.$wx.ready(()=>{
          this.$wx.openLocation({
            latitude: parseFloat(this.res.yAxis), // 纬度，浮点数，范围为90 ~ -90
            longitude: parseFloat(this.res.xAxis), // 经度，浮点数，范围为180 ~ -180。
            name: '', // 位置名
            address: this.res.address, // 地址详情说明
            scale: 16, // 地图缩放级别,整形值,范围从1~28。默认为16
            success: (res)=> {},
          error: function(res) {
          if (res.errMsg.indexOf('function_not_exist') > 0) {
            alert('版本过低请升级')
          }
        }
      });
      })
      },
      /** 管理员申请取消 **/
      handleCancelApply(){
        this.popupApplyCancel=true;
      },
      handleSureApplyCancel(){
        if(this.form.cancelApplyReason==''){
          Toast({
            message: '请输入取消原因',
            position: 'middle',
            duration:800
          });
          return false;
        }
        Indicator.open({
          text: '申请提交中...',
          spinnerType: 'snake'
        });
        var params = new URLSearchParams();
        const postData={
          id:this.$route.query.id,
          cancelFlag:1,
          cancelApplyReason:this.form.cancelApplyReason
        }
        params.append('demandData',JSON.stringify(postData));
        this.$axios({
          method: 'post',
          url:'gp/bu/serviceDemandApp!cancelApplyDemand.do',
          data:params
        }).then((res)=>{
          console.log(res)
        if(res.data.result==true){
          Indicator.close();
          Toast({
            message: res.data.message,
            position: 'middle',
            duration:800
          });
          this.popupApplyCancel=false;
          this.goStateId='7';
          sessionStorage.setItem('goStateId',7); // 存入一个值
          this.$router.push({path:'/push-order-list'})
        }else{
          Indicator.close();
          Toast({
            message: res.data.message,
            position: 'middle',
            duration:1000
          });
          this.popupApplyCancel=false;
        }
      }).catch((error)=>{
          Indicator.close();
        Toast({
          message: error,
          position: 'middle',
          duration:1000
        });
      });
      },
      handleSelectAddress(){
        this.popupMap=true;
        this.isSelectMap=true;
      },
      handleMapClose(){
        this.popupMap=false;
      },
      getMapData(data){
        console.log(data)
        this.form.address=data.address;
        this.form.xAxis=data.xAxis;
        this.form.yAxis=data.yAxis;
        var params = new URLSearchParams();
        params.append('demandSource',this.res.demandSource);
        params.append('demandId',this.res.id);
        params.append('demandData',JSON.stringify(this.form));
        this.$axios({
          method: 'post',
          url:'gp/declaration/sendDemand',
          data:params
        }).then((res)=>{
          if(res.data.statusCode==200){
          Toast({
            message:"修改成功",
            position: 'middle',
            duration: 1200
          });
          this.getData();
        }else{
          Toast({
            message: res.data.message,
            position: 'middle',
            duration: 1500
          });
        }
      });
      },
      handlePayCancel(){
        this.$refs.qrcode.innerHTML = ""
        this.code='';
        this.codeModal=false;
        clearInterval(this.getStatus);
      },
      handleToSelectPay(){
        if(this.res.totalAmt==undefined){
          Toast({
            message: '请等待客服人员报价！',
            position: 'middle',
            duration: 1500
          });
          return false;
        }
        this.selectPayModal=true;
      },
      handlePayCode(){
        this.selectPayModal=false;
        this.handleToPay();
      },
      handlePayWx(){
        this.selectPayModal=false;
        this.handleToPayWX();
      },

      /**二维码弹窗支付**/
      handleToPay(){

        var params = new URLSearchParams();
        params.append('id',this.res.demandId);
        params.append('sn',this.res.sn);
        params.append('payAmt',this.res.totalAmt);
        this.$axios({
          method: 'post',
          url:'gp/bu/wechat!qcPay2.do',
          data:params
        }).then((res)=>{
          if(res.data.result==true){
          console.log(res,11111)

          this.codeUrl=res.data.object;
          this.codeModal=true;
          this.qrcode =new QRCode('qrcode', {
            width:180,
            height:180, // 高度
            text: res.data.object, // 二维码内容
            render: 'canvas', // 设置渲染方式（有两种方式 table和canvas，默认是canvas）
            background: '#f0f',
            foreground: '#ff0',
          });
          this.getStatus=setInterval(()=>{
              var params = new URLSearchParams();
          params.append('from.demandId',this.$route.query.id);

          params.append('businessType',1);
          this.$axios({
            method: 'post',
            url:'gp/bu/serviceDemandApp!demandDetail.do',
            data:params
          }).then((res)=>{
//          if(res.data.statusCode==200){
            this.payStatus=res.data.object.payStatus
          if(this.payStatus==1){

            console.log(res)
            this.res=res.data.object;
            Toast({
              message: '支付成功！',
              position: 'middle',
              duration: 1500
            });
            const demandData={
              id:this.$route.query.id,
            }
            var params = new URLSearchParams();
            params.append('demandData',JSON.stringify(demandData));
            this.$axios({
              method: 'post',
              url:'gp/bu/serviceDemandApp!sendPayMessage.do',
              data:params
            }).then((res)=>{
              console.log(res)
          });

            this.codeModal=false;
            clearInterval(this.getStatus);
          }
//        }
        });
        },3000)
        }else{
          Toast({
            message: res.data.message,
            position: 'middle',
            duration: 1500
          });
        }
      });
      },

      /**弹窗支付**/
      handleToPayWX(){
        var params = new URLSearchParams();
        params.append('id',this.res.demandId);
        params.append('sn',this.res.sn);
        params.append('payAmt',this.res.totalAmt);
        params.append('body','玻璃门店支付');
        params.append('type',0);
        //  调取微信配置接口
        this.$axios({
          method: 'post',
          url:'gp/bu/wechat!prePay.do',
          data:params
        }).then((res)=> {

          if(res.data.result==true){

          var $wxConfig=JSON.parse(res.data.message)
          console.log($wxConfig,566)
          this.$wx.ready(()=>{
            this.$wx.chooseWXPay({
              timestamp:$wxConfig.timeStamp,
              nonceStr:$wxConfig.nonceStr,
              package:$wxConfig.package,
              signType:'MD5',
              paySign:$wxConfig.paySign,
              success:(res)=>{
              this.getData();
              window.location.reload();
            const demandData={
              id:this.$route.query.id,
            };
          var params = new URLSearchParams();
          params.append('demandData',JSON.stringify(demandData));
            this.$axios({
              method: 'post',
              url:'gp/bu/serviceDemandApp!sendPayMessage.do',
              data:params
            }).then((res)=>{
              console.log(res)
          });
        },
          fail:function(res){
            alert('支付弹窗失败')
          },
          cancel:function(res){
            window.location.reload();
          }
        });
        })
        }else{
          Toast({
            message:res.data.message,
            position: 'middle',
            duration:800
          });
        }
      });
      },
    }
  }
</script>

<style>

  .report-order-details .me-popup-pic .item-content{
    position: absolute;
    left: 0;
    right: 0;
    top:0;
    bottom: 0;
  }
  .report-order-details .me-popup-pic  .item-title{
    background:rgba(0,0,0,0.6);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding:12px 0;
    font-size: 16px;
    color: #fff;
  }
  .report-order-details .me-popup-pic  .mint-swipe-indicators{
    display: none;
  }
  .me-popup{
    width: 100%;
  }
  .report-order-details .me-popup-pic{
    width: 100%;
    height:100%;
  }
  .me-popup-pic .mint-swipe,.me-popup-pic .mint-swipe-items-wrap{
    height: 100% !important;
  }
  .report-order-details .me-popup-pic .mint-swipe img{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    display: block;
    max-width: 100%;
    max-height:100%;
  }
  .report-order-details .icon-close-pic{
    background: #c34853;
    position: absolute;
    top:-24px;
    right:6px;
    z-index:2000;
    width: 48px;
    height: 48px;
    border-radius:50%;
    font-size: 24px;
    color:#fff;
    text-align: center;
    line-height: 48px;
  }
  .module-store-info .module-content{
    padding:12px 12px;
  }
  .report-order-details .item-textarea{
    height:100px;
    min-height:100px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
    border: 0;
    outline: 0;
    font-size: 16px;
    padding:6px 16px;
    width: 100%;
    border:1px solid #ddd;
  }
  .report-order-details .module-title{
    background-color:#f5f5f5;
    display: block;
    padding:18px 12px 12px;
    font-size:16px;
  }
  .report-order-details .module-title:before{
    background:#c34853;
    position: relative;
    top:-2px;
    display:inline-block;
    vertical-align: middle;
    width:2px;
    height:16px;
    content: '';
    margin-right:4px;
  }
  .apply-store-popup{
    width: 100%;
    height:90% !important;
    overflow: auto;
  }
  .people-list{
    border-top:1px solid #ddd;
    padding:10px 20px 0 12px;
    margin: 0;
  }
  .people-item{
    margin: 0 0 16px;
    border-bottom:1px solid #ddd;
  }
  .people-item .item-title{
    display: block;
    font-size: 16px;
    line-height: 36px;
  }
  .select-people-name .mint-cell{
    background:none;
    display:inline-block;
    width:32%;
  }
  .select-people-name .mint-cell .mint-cell-wrapper{
    background:none;
    padding: 0;
  }
  .select-people-name .mint-checklist-label{
    padding: 0;
  }
  .pic-none-car{
    background: #fff;
    height:120px;
    margin:0 0 12px;
    line-height:120px;
    font-size: 18px;
    color: #999;
    text-align: center;
  }
  .me-popup-pic .mint-swipe{
    background: #000;
    height:360px;
    text-align: center;
  }
  .report-order-details .pic-car{
    background: #fff;
    text-align: center;
  }
  .report-order-details .pic-car.mint-swipe{
    height:220px;
  }
  .report-order-details .pic-car.mint-swipe img{
    height:100%;
  }

  .mint-checklist-title{
    margin: 0;
  }
  .report-order-details{

    padding:0 0 16px;
  }
  .report-order-details .action-buy{
    background-color:#c34853;
    position: absolute;
    top: 0;
    right:24px;
    height: 32px;
    font-size: 15px;
  }
  .report-order-details .mint-checkbox-core{
    border-radius:3px
  }
  .report-order-details .mint-cell{
    min-height:46px;
  }
  .report-order-details .mint-checklist{
    background: #fff;
  }
  .report-order-details .mint-checkbox-input:checked+.mint-checkbox-core{
    background-color: #c34853;
    border-color: #c34853;
  }
  .report-order-details .mint-checkbox-label{
    font-size: 14px;
    color:#666;
  }
  .report-order-details .product-content{
    background: #fff;
    margin:0 0 12px;
    padding: 12px;
    font-size:14px;
  }
  .report-order-details .product-content .product-img{
    display: table-cell;
    vertical-align: top;
    width:42%;
    padding-right: 12px
  }
  .report-order-details .product-content .product-details{
    display: table-cell;
    vertical-align: top;
    width:50%;
  }
  .report-order-details .product-content .item{
    margin:0 0 4px;
  }
  .report-order-details .product-content .item-img{
    margin:0 0 10px;
  }

  .report-order-details .module-block{
    margin:0 0 12px;
  }
  .report-order-details .module-block-first{
    padding:12px 0 0;
  }
  .report-order-details .word-content{
    background: #fff;
    padding:10px 12px;
    font-size: 16px;
    color:#000;
    margin: 0;
    line-height: 24px;
    border-top:1px solid #f5f5f5;
  }
  .report-order-details .word-car-repair .car-repair-list{
    display: flex;
    margin:0 -6px;
    overflow: auto;
  }
  .report-order-details .word-car-repair .car-repair-item{
    display: flex;
    flex:1;
    width:27%;
    min-width:27%;
    max-width:27%;
    padding:0 6px;
  }
  .report-order-details .word-car-repair .car-repair-item img{
    width:100%;
    height:80px;
  }
  .report-order-details .word-content span{
    color:#999;
  }
  .report-order-details .word-info{
    font-size: 16px;
    line-height:26px;
  }
  .report-order-details .word-price{
    line-height: 26px;
  }
  .report-order-details .price-add{
    padding: 6px 0;
  }
  .report-order-details .price-add .input-price{
    width: 46px;
    margin-left: 2px;
    padding:6px;
    border: 1px solid #ddd;
    outline: none;
    border-radius: 3px;
    color:#c34853;
    text-align: right;
  }

  .report-order-details .button-content{
    padding:16px 16px ;
    font-size:0;
    text-align: center;
  }
  .report-order-details .button-content .mint-button{
    width: 100%;
    padding:0 2px;
    font-size: 16px;
  }
  .report-order-details .button-block-6{
    display: inline-block;
    width: 50%;
    padding:0 8px;
  }
  .report-order-details .button-content .mint-button--default{

    background-color:#fff;
  }
  .deal-tips{
    padding:2px 12px;
    font-size: 15px;
    color:#666;
  }
  .report-order-details .block-header{
    background-color:#f5f5f5;
    position: relative;
    display: block;
    padding:2px 12px 10px;
    font-size:15px;
    color: #666;
  }
  .report-order-details .module-block-price .block-header{
    position: relative;
    padding:8px 12px 14px;
  }

  .report-order-details .block-header .button-pay{
    position: absolute;
    top: 0;
    right:12px;
    font-size: 14px;
    height: 32px;
  }
  .pay-tips{
    float: right;
    font-weight: bold;
  }
  .report-order-details .item-state{
    padding-right: 10px;
    float: right;
    font-weight: bold;
  }
  .report-order-details .block-header:before{
    background:#007EE5;
    position: relative;
    top:-2px;
    display:inline-block;
    vertical-align: middle;
    width:2px;
    height:16px;
    content: '';
    margin-right:5px;
  }
  .module-date{
    padding:0 12px;
    margin:6px 0 8px;
    font-size: 15px;
    color:#007EE5;
  }
  .module-block-price .text-price{
    float: right;
  }
  .push-order-details .item-input .mint-cell-value{
    padding:4px 8px;
    border:1px solid #ddd;
    border-radius:6px
  }
  .push-order-details .item-input .item-select{
    padding:0;
  }
  .push-order-details .item-input .mint-cell-title{
    width: 86px !important;
  }
  .push-order-details .item-input .mint-cell-wrapper{
    background:none;
    padding: 0;
  }
  .push-order-details .module-position{
    padding:6px 0;
  }
  .push-order-details .module-position .position-list{
    display: inline-block;
    vertical-align: top;
    width:100%;
  }
  .push-order-details .module-position .label-title{
    display: inline-block;
    vertical-align: top;
    padding:11px 0 0;
    width: 86px !important;
    font-size: 16px;
  }
  .push-order-details .module-position .mint-checklist{
    display: inline-block;
    vertical-align: top;
    width:70%;
  }
  .push-order-details .module-position .mint-checklist .mint-cell{
    width:48%;
  }
  /*.word-content-address span{*/
  /*text-decoration:underline;*/
  /*color:#c34853 !important;*/
  /*}*/
  .word-content-address .item-left{
    display: inline-block;
    vertical-align: top;
    width: 84px;
  }

  .word-content-address .modify-navigation{
    font-size: 13px;
    height:28px;
  }
  .word-content-address .modify-address{
    padding:13px 0 0;
    text-align: right;
  }
  .word-content-address .item-right{
    position: relative;
    display: inline-block;
    vertical-align: top;
    width:74%;
    padding-right:58px;

  }
  .word-content-address .item-right .item-address{
    display: block;
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
    text-decoration: underline;
  }
  .word-content-address .item-right .item-action{
    position: absolute;
    top: 0;
    right: 0;
    color:#c34853 !important;
  }
  .word-content-address .item-right .icon-didian1{
    padding:0 2px;
    font-size: 22px;
    color:#c34853 !important;
  }
  .word-content-address .item-right .icon-bianji{
    padding:0 2px;
    font-size: 22px;
    color:#c34853 !important;
  }
  .word-content-address .item-right .action-navigation{
    position: absolute;
    top: 0;
    right: 0;
    font-size: 13px;
    height:28px;
  }
  .push-order-details .button-content .del-button{
    padding:14px 0 0;
    text-align: right;
  }
  .push-order-details .del-button .icon-fankui{
    float: left;
    color: #c34853;
  }
  .push-order-details .button-content .icon-shanchu{
    font-size:18px;
    color: #c34853;
    text-decoration:underline;
  }
  .push-order-details .button-content .icon-shanchu:before{
    font-size:20px;
  }
  .push-order-details .popup-apply-cancel{
    width: 100%;
    padding:0 0 32px;
  }
  .action-address{
    text-align: right;
  }
  .action-address .action-navigation{
    height: 36px;
    font-size: 14px;
  }
  .push-order-details .select-wangong .mint-cell{
    min-height: 32px;
    padding:0 0 12px ;
  }
  .push-order-details .select-wangong .mint-cell-wrapper{
    background:none !important;
    padding: 0 !important;
  }
  .mint-toast{
    z-index:100000;
  }
  .popup-map{
    width: 100%;
    height: 100%;
  }
  .push-order-details .select-wangong .mint-cell:last-child{
    background: none;
  }
  .report-order-details .module-height{
    height: 12px;
  }

  .push-order-details .code-modal{
    padding:15px 0 20px;
    width: 100%;
    height:60%;
  }
  .push-order-details .code-modal .modal-header{
    padding:0 24px 16px;
    font-size: 18px;
    text-align: center;
    border-bottom:1px solid #eee;
  }
  .push-order-details .code-modal .modal-header .icon-close2{
    position: relative;
    top: 2px;
    float: right;
    font-size: 20px;
  }
  .push-order-details .code-modal .modal-body{
    padding:20px 32px 0;
    text-align: center;
  }
  .push-order-details .code-modal .price{
    padding:12px 0 0;
    font-size: 17px;
  }
  .push-order-details .code-modal img{
    margin: 0 auto;
  }
  .push-order-details .store-info-tips{
    padding-left: 12px;
    font-size: 14px;
    color: #999;
  }
  .push-order-details .select-pay-modal{
    width: 70%;
  }
  .push-order-details .select-pay-modal .select-pay-title{
    padding:14px 0;
    font-size: 17px;
    text-align: center;
    color: #666;
    border-bottom:1px solid #eee;
  }
  .push-order-details .select-pay-modal .select-pay-content{
    padding:20px 40px 12px;
    margin: 0;
  }
  .push-order-details .select-pay-modal .select-pay-content .item{
    display: block;
    margin: 0 0 16px;
  }
  .push-order-details .select-pay-modal .select-pay-content .mint-button--normal{
    display: block;
    width:80%;
    margin:0 auto;
    font-size: 16px;
  }
  .mint-indicator-mask{
    z-index:10000;
  }
  .mint-indicator-wrapper{
    z-index:10000;
  }
  .push-order-details .action-add-user{
    height: 28px;
    float: right;
    font-size: 14px;
  }
</style>
